Skip to content

fix(nesso): initialize LoRa frontend - #2840

Merged
bmorcelli merged 1 commit into
BruceDevices:devfrom
anapeksha:fix/nesso-lora-navigation
Aug 31, 2026
Merged

fix(nesso): initialize LoRa frontend#2840
bmorcelli merged 1 commit into
BruceDevices:devfrom
anapeksha:fix/nesso-lora-navigation

Conversation

@anapeksha

@anapeksha anapeksha commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Fix Arduino Nesso N1 onboard SX1262 LoRa initialization and reduce touch navigation repeat issues.

Nesso N1 LoRa wiring and RF frontend setup:

  • SX1262 SPI shares the display SPI pins: SCK GPIO20, MOSI GPIO21, MISO GPIO22
  • SX1262 CS: GPIO23
  • SX1262 DIO1/IRQ: GPIO15
  • SX1262 BUSY: GPIO19
  • RF frontend control is on expander 0x43:
    • P5: LNA enable
    • P6: antenna switch
    • P7: LoRa enable/reset

This PR:

  • adds a Nesso board-scoped LoRa frontend helper
  • configures the 0x43 expander with read-modify-write register updates
  • toggles the Nesso LoRa enable/reset path before RadioLib initializes SX1262
  • configures the missing Nesso LORA_BUSY pin
  • sets Nesso's default LoRa radio to SX1262
  • sets Nesso's default LoRa frequency to 915000000.00
  • adds a weak prepareBoardLoRaRadio() hook so other boards keep existing LoRa behavior
  • makes Nesso touchscreen navigation edge-triggered so holding a touch region does not repeatedly spam navigation actions

Types of Changes

Bugfix / board support fix.

Verification

Repository state before opening this PR:

  • GIT_EDITOR=true git pull --ff-only origin main — already up to date
  • git diff --check — passed

Build validation with Homebrew-installed PlatformIO:

  • pio run -e arduino-nesso-n1 — passed
  • pio run -e m5stack-cplus2 — passed as a LoRa-path regression build

Hardware validation on a connected Arduino Nesso N1 / ESP32-C6:

  • detected board on /dev/cu.usbmodem11201 (VID:PID 303A:1001)
  • flashed patched firmware with Homebrew esptool
  • esptool verified all flashed segment hashes
  • Bruce booted after restoring the existing Nesso USE_TFT_eSPI_TOUCH input mode
  • opening LoRa with SX1262 selected now enters the LoRa screen and shows USRN: BruceTest

I did not perform full LoRa packet TX/RX validation because a second LoRa peer was not available in this test setup.

Testing

Covered by PlatformIO builds:

  • arduino-nesso-n1
  • m5stack-cplus2

Covered by physical Nesso N1 testing:

  • patched firmware flashed successfully
  • board boots
  • LoRa SX1262 path enters the LoRa UI instead of immediately failing initialization

Full LoRa packet TX/RX was not claimed here. This PR validates onboard SX1262 bring-up/initialization and UI entry.

Linked Issues

Refs #2816.
Refs #2813.

User-Facing Change

Fix Arduino Nesso N1 onboard SX1262 LoRa initialization and reduce repeated touchscreen navigation events.

Further Comments

The Nesso power/reboot button behavior from #2816 is not changed here. This PR focuses on the reproducible LoRa initialization failure and touchscreen repeat behavior.

@KaratePorkchop21

Copy link
Copy Markdown

Yes that will 100% fix the problem

@anapeksha

Copy link
Copy Markdown
Contributor Author

@bmorcelli Can you please take a look at this?

@bmorcelli
bmorcelli changed the base branch from main to dev August 31, 2026 13:37
@bmorcelli
bmorcelli merged commit 9f36504 into BruceDevices:dev Aug 31, 2026
7 checks passed
Ninja-jr pushed a commit to Ninja-jr/Bruce_firmware that referenced this pull request Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants